//获取应用实例
var app = getApp();

function t(t, e, a) {
    return e in t ? Object.defineProperty(t, e, {
        value: a,
        enumerable: !0,
        configurable: !0,
        writable: !0
    }) : t[e] = a, t;
}

var e, a, o = getApp(), s = o.requirejs("core"), i = (o.requirejs("icons"), o.requirejs("foxui")), n = o.requirejs("biz/diypage"), r = o.requirejs("biz/diyform"), c = o.requirejs("biz/goodspicker"), d = o.requirejs("jquery"), l = o.requirejs("wxParse/wxParse"), u = 0, g = o.requirejs("biz/selectdate");

Page({
  data: {
    indicatorDots: true,
    controls: true,
    playBtn: false,
    duration: 1000,
    cache: false,
    indexCurrent: null,
    videos:"['https://static.haodian.mobi/videos/39/2020/03/Kt017e9087Y3P993M3Yy0P1F8QlT1e.mp4','https://static.haodian.mobi/videos/39/2020/03/Kt017e9087Y3P993M3Yy0P1F8QlT1e.mp4']"
  },

onLoad: function(t) {
    var e = this;        
    var a = decodeURIComponent(t.scene);

    if (!t.id && a) {
        var i = s.str2Obj(a);
        t.id = i.id, i.mid && (t.mid = i.mid);
    }
     // var aa = o.globalData;
     console.log('appInstance',o.globalData) // I am global data


    e.getDetail(t);
},

getDetail: function(t) {
  var e = this;
    s.get("short_video/get_list", {
      id: t.id
        // id: 2
    }, function(data) {
        e.setData({
            short_video_list: data.list
        });
    });
},

// 播放
videoPlay: function() {
   console.log('开始播放')
   
   var videoplay = wx.createVideoContext('livePlayer')
   videoplay.play()
        this.setData({
          playBtn: false
        })

},
    
 // 暂停播放
videoPause: function(){
   console.log('暂停播放')
   
   var videoplay = wx.createVideoContext('livePlayer')
   videoplay.pause()

        this.setData({
          playBtn: true
        })

},
  //转发
  onShareAppMessage: function() {
    // let url = encodeURIComponent('/pages/live_room/index');
 
    return {
      // title: "如何拍摄延时流水照片",
      title: this.data.short_video_info.product_subtitle,
      path:'/pages/live_room/index'
    }

  }

  
})